package com.ctakit.sdk.app.util;

import java.util.Map;

/**
 * Created by lizhenmin on 06/04/2017.
 */

public class MyThreadLocalUtil {

    //创建线程局部变量session，用来保存Hibernate的Session
    public static final ThreadLocal<Map<String,String>> headersMap = new ThreadLocal();
    public static final ThreadLocal<String> reqParams = new ThreadLocal();


    public static void setHeadersMap(Map<String,String> map){
        headersMap.set(map);
    }


    public static Map<String,String> getHeadersMap(){
        return headersMap.get();
    }

    public static void removeHeadersMap(){
        headersMap.remove();
    }


    public static String getReqParams() {
        return reqParams.get();
    }

    public static void setReqParams(String params) {
          reqParams.set(params);
    }

    public static void removeReqParams() {
        reqParams.remove();
    }
}

